@extends('user._layouts.default')

@section('css')
    {{HTML::style('user/css/base.css')}}
@stop

@section('user-main')
<div style="font-size: 25px;">{{{$title or ''}}}</div>
<hr/>
  <style type="text/css" media="screen">
  html, body { height:100%; background-color: #ffffff;}
  #flashContent { width:100%; height:100%; }
  </style>

  <script type="text/javascript">
   function uploadevent(status,picUrl,callbackdata){
  //alert(picUrl); //后端存储图片
	//alert(callbackdata); //后端返回数据
        status += '';
     switch(status){
     case '1':
		  // var time = new Date().getTime();
		  // var filename162 = picUrl+'_162.jpg';
		  // var filename48 = picUrl+'_48.jpg';
		  // var filename20 = picUrl+"_20.jpg";

		  // document.getElementById('avatar_priview').innerHTML = "头像1 : <img src='"+filename162+"?" + time + "'/> <br/> 头像2: <img src='"+filename48+"?" + time + "'/><br/> 头像3: <img src='"+filename20+"?" + time + "'/>" ;
		  window.location.reload();
	     break;
     case '-1':
	      window.location.reload();
        break;
     default:
        window.location.reload();
    }
   }
  </script>
<div id="altContent">
	<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" WIDTH="650" HEIGHT="450" id="myMovieName">
		<PARAM NAME=movie VALUE="{{URL::asset('flash-avatar/avatar.swf')}}">
		<PARAM NAME=quality VALUE=high>
		<PARAM NAME=bgcolor VALUE=#FFFFFF>
		<param name="flashvars" value="imgUrl={{URL::asset($avatar)}}&uploadUrl={{URL::to('user/user/doavatar')}}&uploadSrc=false" />
		<EMBED src="{{URL::asset('flash-avatar/avatar.swf')}}" quality=high bgcolor=#FFFFFF WIDTH="650" HEIGHT="450" wmode="transparent" flashVars="imgUrl={{URL::asset($avatar)}}&uploadUrl={{URL::to('user/user/doavatar')}}&uploadSrc=true" NAME="myMovieName" ALIGN="" TYPE="application/x-shockwave-flash" allowScriptAccess="always" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"></EMBED>
	</OBJECT>
</div>
<!-- <div id="avatar_priview"></div> -->
@stop
<!--[if (gte IE 9)|!(IE)]><!-->
@section('js')
    <script type="text/javascript" src="{{\URL::asset('user/js/base.js')}}"></script>
@stop